package cn.yto.print.model.request;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class WxsphPrintRequest {

    private String command;
    private String version;
    private String requestID;
    private String printer;
    private List<Task> taskList;

    @Data
    public static class Task {
        private String taskID;
        private String printInfo;
        private printNum printNum;
        private int splitControl;
        private CustomInfo customInfo;
        private Map<String, Object> extendData;
    }

    @Data
    public static class CustomInfo {
        private String templateUrl;
        private Map<String, Object> data;
    }

    @Data
    public static class printNum {
        private int curNum;
        private int sumNum;

        public printNum(int firstDocumentNumber, int totalDocumentCount) {
            this.curNum = firstDocumentNumber;
            this.sumNum = totalDocumentCount;
        }
    }

}
